#!/usr/bin/env python3

import rospy
from DrEmpower_can.msg import set_angles
# import DrEmpower as dr

def callback(data):
    import DrEmpower as dr
    dr.set_angles(id_list=data.id_list, angle_list=data.angle_list, speed=data.speed, param=data.param, mode=data.mode)
    rospy.loginfo("set_angles_node")


def listener():
    rospy.init_node("set_agnles", anonymous=True)
    rospy.Subscriber("set_angles", set_angles, callback)
    rospy.spin()


if __name__ == '__main__':
    listener()

